package com.share.bean.oa.org;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

/**
 * 说明：
 * 员工登录账号密码信息
 * <br/>作者： 杨浩泉
 * <br/>日期： 2010-5-1
 */
@Entity
@Table(name="share_oa_empAccount")
public class EmpAccount {
	
	private int id ;
	
	/** 员工账号 */
	private String account ;
	
	/** 员工密码 */
	private String password ;

	/** 员工离职原因与员工信息一对一关系，维护端为员工 */
	private Employee employee ;

	public String getAccount() {
		return account;
	}

	@OneToOne(mappedBy="empAccount",cascade=CascadeType.REFRESH)
	@JoinColumn(name="account_id")
	public Employee getEmployee() {
		return employee;
	}

	@Id @GeneratedValue
	public int getId() {
		return id;
	}

	public String getPassword() {
		return password;
	}

	public void setAccount(String account) {
		this.account = account;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setPassword(String password) {
		this.password = password;
	}
}
